{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "from sklearn.ensemble import RandomForestRegressor\n",
    "from sklearn.pipeline import Pipeline,make_pipeline\n",
    "from sklearn.ensemble import GradientBoostingClassifier, RandomForestClassifier\n",
    "from sklearn.feature_selection import SelectKBest\n",
    "from sklearn import cross_validation, metrics\n",
    "from sklearn.grid_search import GridSearchCV, RandomizedSearchCV\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')\n",
    "\n",
    "train = pd.read_csv('train.csv',dtype={\"Age\": np.float64})\n",
    "test = pd.read_csv('test.csv',dtype={\"Age\": np.float64})\n",
    "PassengerId=test['PassengerId']\n",
    "all_data = pd.concat([train, test], ignore_index = True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 891 entries, 0 to 890\n",
      "Data columns (total 12 columns):\n",
      "PassengerId    891 non-null int64\n",
      "Survived       891 non-null int64\n",
      "Pclass         891 non-null int64\n",
      "Name           891 non-null object\n",
      "Sex            891 non-null object\n",
      "Age            714 non-null float64\n",
      "SibSp          891 non-null int64\n",
      "Parch          891 non-null int64\n",
      "Ticket         891 non-null object\n",
      "Fare           891 non-null float64\n",
      "Cabin          204 non-null object\n",
      "Embarked       889 non-null object\n",
      "dtypes: float64(2), int64(5), object(5)\n",
      "memory usage: 83.6+ KB\n"
     ]
    }
   ],
   "source": [
    "train.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d53f7c5dd8>"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_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5L5wNfTfI04Jr+J6vq28CDSV7f3X+SvOIUa160DIXFaRvwriR30ZmCZJBb6Awr3ZvkS9229GSc6rH0r4DPA39E53rYINcA1yX5IrCPJ67dohF5R7MkqeGZgiSpYShIkhqGgiSpYShIkhqGgiSpYShIJ6E7j8++JPcmuad7A5a0YHhHszSiJK8C/h7wN6rq0SQXAOeMuSzptPJMQRrd84GHqupRgKp6qKoOJ7k4yae6M3TuSfL8JGd3Z/a8HCDJu5K8c5zFS6Pw5jVpRN2J1/4EeAbwx8BHgM8AnwI2VNVskl8Efqaq/nGSHwNuB26gcxf5pVV1dDzVS6Nx+EgaUVV9N8nFwN+mMwX0R4BfozP98x91p/ZZAny1239fkg/SmfnzVQaCngoMBekkVNVjdGaV/WR3KvI3A/uq6lUneMmPA98Cnjc/FUqnxmsK0oiSvKS7BsVxr6SzvsRE9yI0SZ7WHTYiyc8DzwUuA96b5DnzXbN0srymII2oO3T0m3QWezkGTAObgWXAe+lMSX428O+B/0rnesMVVXUwyQ3AxVX1hnHULo3KUJAkNRw+kiQ1DAVJUsNQkCQ1DAVJUsNQkCQ1DAVJUsNQkCQ1DAVJUuP/A+3sTjSqCPg/AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.barplot(x=\"Sex\", y=\"Survived\", data=train, palette='Set3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d53f8427f0>"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZX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fhBsySp8fCRJKmxFCRJjaUgSWosBUlSYylIkhpLQZLUWAqSpMZSkCQ1/w/XGyvHYEZtcAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.barplot(x=\"Pclass\", y=\"Survived\", data=train, palette='Set3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<seaborn.axisgrid.FacetGrid at 0x1d53f8899e8>"
      ]
     },
     "execution_count": 89,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAdwAAADQCAYAAACtFtA6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzs3Xd4lFX68PHvmZn0XiEhFdIIHUJRacqiWLGuIK64FrDtuuq66q66q7u2n7vr6lpee18bWFBRRLAiLfQWIEAglfRepp33jxk0xkAGCJmZ5P5c11wz88x5ztwTwtw55zlFaa0RQgghxIllcHcAQgghRF8gCVcIIYToAZJwhRBCiB4gCVcIIYToAZJwhRBCiB4gCVcIIYToAZJwhRBCiB4gCVcIIYToAZJwhRBCiB5gcncAR2PGjBn6888/d3cYQgghupdydwA9watauJWVle4OQQghhDgmXpVwhRBCCG8lCVcIIYToAZJwhRBCiB4gCVcIIYToAZJwxQlnt2vK61vZXFRLRUObu8MRQgi38KppQcI7NLRaePWHAlbkV1Fc20JpXQsWm/7x9fgwf0YmhTMiIZyclAhGJ0WgVJ+YFSCE6MMk4Ypu02K28drKAp75Zg+1zRYGxQQxICKAkYnhRAX7EhHoS0VDG/kVjazbX8PiLWUADIkP5aZT0zhjSH8MBkm8QojeS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9LzZVbohKS3JY2V59ZL+rAMCHin177PzOrhgmvWjrvIOawHgV8kjQD3kKMdrwYeJMeU9fpbPweMRcR64GXgqTZCm9mZWzL4JWa2AMbJAQWQAwvGgaXAtoj4GzgiaVd5fi2wDtiZ7Wc5m2wfamYVccE1a5ikFeREoHWSgiygQU7amfFbgP0RcWNDEc1sAXhL2ax5Y8CrEXFZRKyOiEuBQ8BPwL3lLPdicpABwJfASkmntpglXdVGcDM7cy64Zs0b5/+fZreTA7mnyCkqLwK7gRMR8QdZpJ+WtJec4rShubhmNh88LcisQyQtj4jfyrbzx8Bo5NxWM6ucz3DNumVC0jBwDvCki63Z4uFPuGZmZg3wGa6ZmVkDXHDNzMwa4IJrZmbWABdcMzOzBrjgmpmZNeAf7t1u1/gciUwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 483.875x216 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "facet = sns.FacetGrid(train, hue=\"Survived\",aspect=2)\n",
    "facet.map(sns.kdeplot,'Age',shade= True)\n",
    "facet.set(xlim=(0, train['Age'].max()))\n",
    "facet.add_legend()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d53f6fa0b8>"
      ]
     },
     "execution_count": 90,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAE8VJREFUeJzt3X+QXWd93/H3xyKOjXEh2BtELDn2JArFYYhJFuGUjPllUlEyVqc4xDZhYMaJmhYVCgkae6AusZvpVK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RJJnJFkzsOl84Cszmp0EXNJfvhz4dH/fl/dnvARYAzwGfLO/vr7/TOczgBfSm0BPOmZ4pCAN9yTgv/WnxD4E7KU3lPThgTbfAX46yW3AQ8Cv9Le/GrguyT/0931VVT3Wz4lbgb8AzgauPfwcAOlY4Syp0hLp36/wcFX97rhrkY7E4SNJUuORgiSp8UhBktQYCpKkxlCQJDWGgiSpMRQkSY2hIElq/h/im3Ngw5SlWQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.barplot(x=\"SibSp\", y=\"Survived\", data=train, palette='Set3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d53f987668>"
      ]
     },
     "execution_count": 91,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAEpZJREFUeJzt3X+wX3V95/Hni0QWpAjVZI1LEmHX1Mo6XXGuiEMHsWCLrgPdqa2gddsu04ytaLu2zdhtl1rczm7TGa1t0W1Wrda2sFTaTuqk0lZRWXfRBEXkZzcLtLnBOwRQFI2myb73j+/JZy+Xm/v93uSenFx4PmbufM8538/3c983hLzu+XzO+ZxUFZIkARw3dAGSpGOHoSBJagwFSVJjKEiSGkNBktQYCpKkxlCQJDWGgiSpMRQkSc3KoQtYrFWrVtXpp58+dBmStKzccsstD1XV6nHtll0onH766ezYsWPoMiRpWUny95O0c/hIktQYCpKkxlCQJDWGgiSpMRQkSU1voZDk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isRUlyDXA+sCrJNPBrVfWBYaua2LnAG4Evd+PyAP+huyN+OXgO8OHuKrbjgOuqatld1rmMPRv48+5RLCuBP6mqjw9b0qK9Bfjj7pfSe4GfGqoQL0mVJDUOH0mSGkNBktQYCpKkxlCQJDWGgiSpMRSkeSQ50K24eXuSP03y9CXo8yeT/N5S1Cf1xVCQ5re3ql7UrTi7D3jTpB/s7leQliVDQRrvJuB5AEn+olt07Y7ZC68leSzJVUk+B7wsyUuS/M/uGQufP3jHLfDPknw8yf9OsnmAn0VakHc0SwtIspLRImsH75D9d1X1SLecxfYk11fVw8BJwO1VdWV3V+rdwOuqanu3NPLe7vMvYrQK7HeAe5L8blXtQjpGGArS/E6cteTGTXRr3QNvTfJvuu11wAbgYeAAowX9AJ4PfKWqtgMcXPG1W4bhE1X1aLd/J/BcHr9suzQoQ0Ga395uKewmyfmMFrt7WVV9K8mngBO6t79dVQcONuXQS69/Z9b2Afx/UMcY5xSkyZ0CfLULhO8FzjlEu7sZzR28BCDJyd0wlHTM8y+qNLmPA29KchtwDzDvM5iral+S1wG/28097GV0hiEd81wlVZLUOHwkSWoMBUlSYyhIkhpDQZLUGAqSpMZQkCQ1hoIkqTEUJEnN/wOMeQU4y5KuRAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.barplot(x=\"Parch\", y=\"Survived\", data=train, palette='Set3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d53f9d06a0>"
      ]
     },
     "execution_count": 92,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZkAAAEKCAYAAADAVygjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29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/w/gtWLbc7L5RAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.barplot(x=\"Fare\", y=\"Survived\", data=train, palette='Set3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<seaborn.axisgrid.FacetGrid at 0x1d53faa34a8>"
      ]
     },
     "execution_count": 93,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAdwAAADQCAYAAACtFtA6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl8HNWV6PHf6UW7LFmbZVuWJdvyIu8LAgKExAxgiMEsJtiBwLzAQFjeJGEyCVngESbLkLwMDAPOBAgEeKwxEJyBxECMwxLwbuPdeJFtyYtka7X27r7vj6q22nJLaslSL9L5fj7lruVW6XR92n363rp1S4wxKKWUUqp/OSIdgFJKKTUYaMJVSimlwkATrlJKKRUGmnCVUkqpMNCEq5RSSoWBJlyllFIqDDThKqWUUmGgCVcppZQKA024SimlVBi4Ih1AT8ybN8/85S9/iXQYSiml+pZEOoBwiKka7rFjxyIdglJKKdUrISVcEZknIjtFZLeI3Btke7yIvGJvXyUiBfb6EhHZaE+bROTqUI+plFJKDSTdJlwRcQKPA5cBxcBiESnuUOwWoNoYMw54GHjIXr8FmGOMmQHMA34rIq4Qj6mUUkoNGKHUcEuA3caYvcaYVuBlYEGHMguAZ+35pcBFIiLGmEZjjMdenwD4H00UyjGVUkqpASOUhDsSOBiwXGavC1rGTrC1QCaAiJwtIluBzcA37e2hHFMppZQaMELppRys91jHh+h2WsYYswqYL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u91Bt91www21QG1fxtodzQT95KyCDOqaPXyy93ikQ1FKqZhVXl7uzsjI8CQmJhqA4cOHewoKCtpGjhw59fDhwy6ADz74IKmkpGQCwD333DNi8eLFo88777yia665pnDatGkT165dm+A/XklJyYQPP/ww6dFHH8286aab8o8fP+4cOXLkVK/X6nNTX1/vyM3NndbS0iJbt26Nv+CCC4omT548afbs2RM2bNiQALBjx464GTNmTJwyZcqkb33rWyNCfS+acPvJ1JFpJLod/EWblZVSqteuuuqqukOHDsUVFBRMufHGG/PfeuutlO72+eyzz5KWL1+++09/+tO+a6+9tuqFF17IANi/f7+7oqLCfcEFFzT6y2ZmZnonTpzY+Pbbb6cCvPzyy2kXXnhhbXx8vLn11ltHL1my5MDWrVu3/+pXvyq744478gHuvPPO/FtvvbVyy5Yt23Nzc0MedEETbj+JczmYMWoo72w9gtc3IPoAKKVU2KWlpfm2bNmy7bHHHtufnZ3tufnmm8c++uijmV3tM2/evJqUlBQDcNNNN1UvW7ZsKMBzzz039IorrqjuWP66666rfumll4YCvPrqqxmLFi2qrq2tdWzYsCHluuuuGztx4sTiO++8c3RFRYUbYP369Sn/9E//VAVw++23h9yMqddw+9FZBRl8svc4a0qrOGdMl58PpZRSnXC5XMyfP79+/vz59dOmTWt6/vnnM51Op/H5fAA0NTWdUnlMTk72+ecLCwvb0tPTPatWrUp8/fXXM37729/u73j8xYsX1zz44IMjjx496tyyZUvSFVdcUVdXV+dITU317NixY1uwmHrTmzqkGq6IzBORnSKyW0TuDbI9XkResbevEpECe32miLwvIidE5LEO+6y0j7nRnnJ6Gny0m5mfToLbwWvryiIdilJKxaRNmzbFb968Od6/vGHDhsS8vLzWvLy81o8//jgJ4NVXXx3a1TEWLlxY9fOf/zy3vr7eWVJS0tRxe1pamm/69OkNt99+e/5FF11U63K5yMjI8OXl5bU+/fTTQwF8Ph+ffPJJIsCsWbNOPPnkkxkATz75ZMi1qW4Trog4gceBy4BiYLGIFHcodgtQbYwZBzwMPGSvbwbuA77byeFvMMbM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[
       "<Figure size 483.875x216 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "facet = sns.FacetGrid(train, hue=\"Survived\",aspect=2)\n",
    "facet.map(sns.kdeplot,'Fare',shade= True)\n",
    "facet.set(xlim=(0, 200))\n",
    "facet.add_legend()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count    891.000000\n",
       "mean      32.204208\n",
       "std       49.693429\n",
       "min        0.000000\n",
       "25%        7.910400\n",
       "50%       14.454200\n",
       "75%       31.000000\n",
       "max      512.329200\n",
       "Name: Fare, dtype: float64"
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train['Fare'].describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d5411d6080>"
      ]
     },
     "execution_count": 95,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAELCAYAAAA2mZrgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAEjRJREFUeJzt3X+QXWddx/H3p6mRqgXRrpRpEpLBFIyAVJfoKPJDQFPRxhHUFHTamWr8QUBF7JTR6WAZR40zMGqDEsYqw0hDrb8WjROHHyogxWwhYpMYXdNiNjESfovGltSvf+zN42V7d+9tumdvmn2/Zu7sfZ7znHO/m8ns557n3vOcVBWSJAFcNO4CJEnnD0NBktQYCpKkxlCQJDWGgiSpMRQkSY2hIElqDAVJUmMoSJKai8ddwMN12WWX1fr168ddhiQ9qtx9992fqKqJYeMedaGw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A8At/Rtez/wLVV1FXP3lrix1/8a4BVV9Uzg24HTCxz7acDdC2z7OPCiqvpG4IeA3+zbthn4OeDpwJOB7x+w/0ZgV1V9PfAZ4CWL/5rSI+P0kVaK070/7sDcZwrAZK+5BnhHkicCq4F7e/0fAN6Q5A+AP66q2XN43S8Bbk3yTOBB4Mq+bX9fVUd79dwOPBu4c97+91bVgd7zu4H151CDNDLPFCT4LeDWqno68OPAYwCq6leBHwUuAe5K8tQF9j8IfNMC236Wuc8VvoG5EFrdt23+wmODFiK7v+/5g/hGTh0zFCR4HHC89/y6s51JnlxV/1hVvwZMAwuFwtuBb03y4r59tyR5eu/Y/15V/wv8CLCqb7/NveXLL2Juaun9S/YbSefIUJDgdcAfJnkf8Im+/p9Jck+Sf2Du84S/HLRzVZ0Gvgd4ZZJ/SXIIuJ65zxPeBFyX5C7mpo7+q2/XDwK/CtzD3JTVnyzlLyWdC5fOliQ1nilIkho/tJJG1PuM4G3zuu+vqm8eRz1SF5w+kiQ1Th9JkhpDQZLUGAqSpMZQkCQ1hoIkqfk/f4SyFjHhNdYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "train.loc[train.Cabin.isnull(), 'Cabin'] = 'U0'\n",
    "train['Has_Cabin'] = train['Cabin'].apply(lambda x: 0 if x == 'U0' else 1)\n",
    "sns.barplot(x=\"Has_Cabin\", y=\"Survived\", data=train, palette='Set3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d53f74add8>"
      ]
     },
     "execution_count": 96,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1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7AqoAd5aVS8c/pxeVZ8ezt/f9WP+J3BekiMXJ7F0YCwFaUpzXAH1FuDNSZ4xfP3MJM8CPg38qyRHD+ePDh/9IbAF+JMkbqlryfGXUprffFdA/QNgHfDl4a03dwGXVNWnhvfY3pbkKQYl8B9mV1hV70lyHHBjkiuq6v8t3h9Hmp9XSZUkNQ4fSZIaS0GS1FgKkqTGUpAkNZaCJKmxFCRJjaUgSWosBUlS8/8BdRBbOA+aF7EAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "all_data['Cabin'] = all_data['Cabin'].fillna('Unknown')\n",
    "all_data['Deck']=all_data['Cabin'].str.get(0)\n",
    "sns.barplot(x=\"Deck\", y=\"Survived\", data=all_data, palette='Set3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d541299438>"
      ]
     },
     "execution_count": 97,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAFZdJREFUeJzt3X20XXV95/H3hyDlQR4qRNPFQ8NgqFIXQldAl7WIik5wZsApUkBGtGXK6ozoKlaz6OCghXHphI6MVnCaaRHLjFAsHU1ZUZxRKi4QJQiEp1IjqCR4NYhFxVAa+p0/zs725ObmnpPk7Htubt6vte46Z+/9O/t+f/ck53P2bz+lqpAkCWC3cRcgSZo9DAVJUstQkCS1DAVJUstQkCS1DAVJUstQkCS1DAVJUstQkCS1dh93AdvqoIMOqoULF467DEn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rq+oj465jlLahT2cA9zWb/y9ilu9QH7JflzU78u6j98F0D7Oon9P0YRnwwSS3svkH4ha1V9UPgVubnbiXVdUXgE8BX01yL739FpM/PDtXVXfR+3ufCfwfYHUz/SVgaVVNNO2+DzzI5sM9VwJvTXI7vaGjqb4h3wwctWlHczNvBb3hsi6HjqjeIP+/BU5P8k3g74Gngf+0Dev4PL16VzXv57ubRWcD5ya5h94WyeR70XTGM5oljV3zTfle4NeaLYwdWddiejuAf2Mkxe1i3FKQNFZJTgL+DviTEQTChcANwB+OorZdkVsKkqSWWwqSpJahIElqGQqSpJahIA2Q5MDmkMe7k0wkWdc3fVvTZmGSN/e95sTs5Fei1a7Jy1xIAzTnABwDvQsI0rtuzR9ParYQeDO9cwOknZZbCtIO6Lva5YeA32i2Hi6Y1GafJFeld8XSu/qvCCrNNoaCNBoXAl9prlNz+aRlF9G7yuVxwKvpnWG9z4xXKA3BUJC693rgwuYyBn9L78J2h421Imkr3KcgdS/AaVX10LgLkQZxS0Eajamu1rnJTcA70lwcP8mxM1aVtI0MBWk0VgMbm1sqXjBp2aX0bpCzurlS66UzXp00JK99JElquaUgSWoZCpKklqEgSWoZCpKklqEgSWoZCpKklqEgSWoZCpKk1v8HzBdfUbz8g2cAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "all_data['Title'] = all_data['Name'].apply(lambda x:x.split(',')[1].split('.')[0].strip())\n",
    "Title_Dict = {}\n",
    "Title_Dict.update(dict.fromkeys(['Capt', 'Col', 'Major', 'Dr', 'Rev'], 'Officer'))\n",
    "Title_Dict.update(dict.fromkeys(['Don', 'Sir', 'the Countess', 'Dona', 'Lady'], 'Royalty'))\n",
    "Title_Dict.update(dict.fromkeys(['Mme', 'Ms', 'Mrs'], 'Mrs'))\n",
    "Title_Dict.update(dict.fromkeys(['Mlle', 'Miss'], 'Miss'))\n",
    "Title_Dict.update(dict.fromkeys(['Mr'], 'Mr'))\n",
    "Title_Dict.update(dict.fromkeys(['Master','Jonkheer'], 'Master'))\n",
    "all_data['Title'] = all_data['Title'].map(Title_Dict)\n",
    "sns.barplot(x=\"Title\", y=\"Survived\", data=all_data, palette='Set3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d5412e72e8>"
      ]
     },
     "execution_count": 98,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAEsZJREFUeJzt3X+Q3Hd93/Hny/IYTMDQ4itiLCnSGJFEIS6Qs0IaauNgUnma2FNwwIIGPEOjoY1KpyRRTWHcxJT+UCdk0kE4iAmJhxaEISVRqFqlMRDAiROdweNUNsKKbKqTc4MMrjGpbCPz7h+7+mR9rO5W8n1vT7rnY+Zm9/vdz36/L3tH97rv97vf7zdVhSRJAOeMO4AkaemwFCRJjaUgSWosBUlSYylIkhpLQZLUWAqSpMZSkCQ1loIkqTl33AFO1YUXXlhr164ddwxJOqPceeedD1XVxHzjzrhSWLt2LVNTU+OOIUlnlCRfG2Wcu48kSY2lIElqLAVJUmMpSJIaS0GS1FgKkqTGUpAkNZaCJKk5405ek5aibdu2MTMzw8qVK9m+ffu440inzVKQFsDMzAxHjhwZdwzpaXP3kSSpsRQkSY2lIElqOi2FJJuSHEhyMMkNJxnz+iT3JNmf5KNd5pEkza2zA81JVgA7gNcA08C+JLur6p6BMeuBdwI/UVUPJ/k7XeWRJM2vyy2FjcDBqjpUVU8Au4BrZo35eWBHVT0MUFVf7zCP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3A1dW1cuBKeAdSZ4JfAj4GeDvAysX6P+BNCd3H2k5mWv30e7+418Az66qR4FHkzyW5Hn91/68qg4BJPkY8Ergk8Drk2yh9+/phfQuU3J3/z0fn7WeDwK3DlxG4RX98bf37vfCecCfAj8I3F9V9/XX91/oXUVX6pSlIPU83n/87sDzE9Mn/p3MPv2/kqwDfgm4tKoeTvI7wDMHxvz1rPf8CXBFkl+rqsfoXaL5f1XV5sFBSV46ZH1S59x9JI1uY5J1/WMJbwC+CFxA7xf/I0leAFw1zzJ+C9gDfCLJucAdwE8keRFAkmf17+38FWBdkov779s8dGnSAnNLQcvJ+UkGb5P5P6tq5K+l0tut8x/oHVP4PPCpqvpuki/Tuy7/IeD2+RZSVe9L8lzgI8CbgOuBjw3cLP7dVfXV/i6p/57kIXoF9JJTyCqdFi+IJ0lq3H0kSWosBUlSYylIkhpLQZLUWAqSpMZSkCQ1loIkqbEUJEnN/wfsVPUf+xGTCQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.barplot(x=\"Embarked\", y=\"Survived\", data=train, palette='Set3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d54133af98>"
      ]
     },
     "execution_count": 99,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAE/JJREFUeJzt3X+w3XV95/HniyjyQwSV1FRCDGsBoW4BjSmVHSoCFmwX3K0oFLXdZcu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ZA/gx5MUmtQJh4+0kO0P3FdVTzIYIlo0GxttptG+F7iAwSUWSfLCJMNTVx8NPOWKY0n2ZzAd+FuqakuzrYcYDDmd0ayTJEfNRk5pMu4paCH7MPCp5gP3WgYXopktn2RwdNH26aqfCfx5khcy2IPYArx15DWvA14E/NX2oaJmD+Fs4CNJLmi2cwWD7yikWechqVIHknwIuLGqPtZ3FmlnWArSLEtyA4O9jpOr6rHp1pfmE0tBktTyi2ZJUstSkCS1LAVJUstSkCS1LAVJUstSkCS1/h8wFaA9hRg/UQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "all_data['FamilySize']=all_data['SibSp']+all_data['Parch']+1\n",
    "sns.barplot(x=\"FamilySize\", y=\"Survived\", data=all_data, palette='Set3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d5413cbc88>"
      ]
     },
     "execution_count": 100,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAEehJREFUeJzt3XuwXWV9xvHvkyCVKtJRjuKQYBgN1tQb9ZhedPBKC+0M2IoK4oUObcYZo7ZWGZgy1MLYS5zRqUO0xApSRkS8tI2dtFgR71VzuAwaYjQClpMYjWi9FcHAr3+cnbfbw87ZO3BW9kny/cyc2etd6z3v/s3sOfs56917vStVhSRJAIvGXYAkaeEwFCRJjaEgSWoMBUlSYyhIkhpDQZLUGAqSpMZQkCQ1hoIkqTlk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RJvVqf1TvzubfXR+qE00c6UA2aPnoIcHGS3W+ux/Ud21hV3wZI8k3g4739XwGet6cnqapKcgXwiiSXAb8FvGqOuo4ALk+ynJmVcB/Sd+w/q+rOXg0fBZ4N7AKeAWycWaKHw5gJN6kThoIOJn8GfIeZs4JFwM/6jt3dt31fX/s+hv+dXAZ8rDfeh3prWe3JRcB1VfUHvQ+/P9V3bPaaM8XMsuqXV9V5Q2qQ5oXTRzqYHAF8u6ruY2aKaF7m5qtqOzNLnZ8PvG+EGrb1ts+adezEJI9MchjwIuDzwLXAaUkeDdA7/rj5qFsaxDMFHUzeBXwkyUuA64CfzuPY7wcmBtzX9+Yk9/W2rwbWMDN99EZmPo/o9zngCuAJwJVVNQWQ5Hzg40kWAT8HXgt8ax5rlxpXSZXmQe8agxur6r3jrkV6MAwF6UFKcj0zZx0nVtXdw/pLC5mhIElq/KBZktQYCpKkxlCQJDWGgiSpMRQkSY2hIElq/g/zGrj65JbhuQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "def Fam_label(s):\n",
    "    if (s >= 2) & (s <= 4):\n",
    "        return 2\n",
    "    elif ((s > 4) & (s <= 7)) | (s == 1):\n",
    "        return 1\n",
    "    elif (s > 7):\n",
    "        return 0\n",
    "all_data['FamilyLabel']=all_data['FamilySize'].apply(Fam_label)\n",
    "sns.barplot(x=\"FamilyLabel\", y=\"Survived\", data=all_data, palette='Set3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d54141e940>"
      ]
     },
     "execution_count": 101,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALE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/aF7j+c16f8/gJCmSnN3M4X/LxHUFkhw4NKf+W5pym9iT+askX2226Xs6DS0w7iloUUryYuAU4Kiq+kmSvSc9/QTgk8AtVfXuJPsA5wAnVNXDSd4GnF1V5yU5m8F1FO5PchJw00QhbMORwGFVdWeSXwf+E3AUEODqJF8CHpgm/u5V9ZvNpHsXAr1OUqiFxT0FLVYnAB+tqp8AVNXkeew/RFMIzfLRwKHAV5ppxF8DPH26N0jyzuZ7jMlz819TVXc2958H/ENVPdxct+IzwL8fIftFTeargD0n5qeSZoOloMUqbPuCQV8Fjstjl2QMg3mfDm9+Dq2qqebLWgc8J8lOAFX17mba8T0nrfPwUIapbGbLv5vDl4Yczu1cNZo1loIWq8uBP5g4cmho+OgjwBrg0uZKXF8HjknyjGbd3ZIc0qz7Y2APgKpaD6wF3pVkSbPuLmz7w/8q4JTm9XYHfhv4MvA94Jebo6ieCLx0aLtXNK/9PAYXhHlwpn8I0jC/U9CiVFWfT3I4sDbJIwxK4L9Nev59SfYCPgGcDrwWuKj5kIbBdwz/wmA2zX9K8t2qOg74z8B7gfVJfgBsAt62jQzXJ/kYg5lVAT5cVTcAJDmPwdX37mTr6cofaA6t3ZMpjmySHg9nSZV2IEmuBN5SVWv7zqKFyeEjSVLLPQVJUss9BUlSy1KQJLUsBUlSy1KQJLUsBUlSy1KQJLX+P5CDvX6cebZoAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "Ticket_Count = dict(all_data['Ticket'].value_counts())\n",
    "all_data['TicketGroup'] = all_data['Ticket'].apply(lambda x:Ticket_Count[x])\n",
    "sns.barplot(x='TicketGroup', y='Survived', data=all_data, palette='Set3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1d5414a5d30>"
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAEkxJREFUeJzt3X+wX3dd5/HnK+lWBFoY6VXYJiEdCWpkEMZrcBYWqRRN1WlRUVu6AiuaccYsMhVjWZmOG2R2rU5Rx4hEqCJKawF/RCdaFcuPBSm5LRVIYvCaVntTIil0K4WuJfDeP+7JZ7/98s39ftPck+9N8nzMfOeezzmfc77v5M69r3s+33M+J1WFJEkAq6ZdgCRp5TAUJEmNoSBJagwFSVJjKEiSGkNBktQYCpKkxlCQJDWGgiSpOWfaBZyoCy64oNavXz/tMiTptHL77bffV1Uz4/qddqGwfv165ubmpl2GJJ1WkvzzJP0cPpIkNYaCJKkxFCRJjaEgSWoMBUlSYyhIkhpDQZLUGAqSpOa0u3lNkpbbtm3bOHz4ME9+8pO57rrrpl3OVBkKks56hw8f5tChQ9MuY0Vw+EiS1BgKkqTGUJAkNYaCJKkxFCRJjaEgSWoMBUlS02soJNmc5ECS+STXHKfPDyfZl2Rvknf0WY8kaWm93byWZDWwA3gRsADsSbKrqvYN9NkAvBZ4blXdn+Rr+6pHkjRen2cKm4D5qjpYVQ8DNwGXD/X5CWBHVd0PUFWf7rEeSdIYfYbChcA9A+2Fbt2gpwNPT/LBJB9OsrnHeiRJY/Q591FGrKsR778BeAGwBvhAkmdU1f95xIGSLcAWgHXr1i1/pZIkoN8zhQVg7UB7DXDviD5/WlVfrKq7gAMshsQjVNXOqpqtqtmZmZneCpaks12fobAH2JDkoiTnAlcAu4b6/AlwMUCSC1gcTjrYY02SpCX0FgpVdRTYCtwC7Adurqq9SbYnuazrdgvwmST7gFuBn62qz/RVkyRp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K73d5fWns+IK5ukk+EsqdJpJMl7gddU1dy0a9GZyeEjSVLjmYIkqfFMQZLUGAqSpMZQkCQ1hoIkqTEUJEmNoSBJav4fS7Hf3AU2PPsAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "def Ticket_Label(s):\n",
    "    if (s >= 2) & (s <= 4):\n",
    "        return 2\n",
    "    elif ((s > 4) & (s <= 8)) | (s == 1):\n",
    "        return 1\n",
    "    elif (s > 8):\n",
    "        return 0\n",
    "\n",
    "all_data['TicketGroup'] = all_data['TicketGroup'].apply(Ticket_Label)\n",
    "sns.barplot(x='TicketGroup', y='Survived', data=all_data, palette='Set3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(92, 10)\n",
      "(85, 10)\n",
      "              Age        Fare       Parch  PassengerId      Pclass  \\\n",
      "count  891.000000  891.000000  891.000000   891.000000  891.000000   \n",
      "mean    29.422814   32.204208    0.381594   446.000000    2.308642   \n",
      "std     13.555050   49.693429    0.806057   257.353842    0.836071   \n",
      "min      0.420000    0.000000    0.000000     1.000000    1.000000   \n",
      "25%     21.000000    7.910400    0.000000   223.500000    2.000000   \n",
      "50%     28.721672   14.454200    0.000000   446.000000    3.000000   \n",
      "75%     36.750000   31.000000    0.000000   668.500000    3.000000   \n",
      "max     80.000000  512.329200    6.000000   891.000000    3.000000   \n",
      "\n",
      "            SibSp    Survived  FamilySize  FamilyLabel  TicketGroup  \n",
      "count  891.000000  891.000000  891.000000   891.000000   891.000000  \n",
      "mean     0.523008    0.383838    1.904602     1.313131     1.358025  \n",
      "std      1.102743    0.486592    1.613459     0.494505     0.495814  \n",
      "min      0.000000    0.000000    1.000000     0.000000     0.000000  \n",
      "25%      0.000000    0.000000    1.000000     1.000000     1.000000  \n",
      "50%      0.000000    0.000000    1.000000     1.000000     1.000000  \n",
      "75%      1.000000    1.000000    2.000000     2.000000     2.000000  \n",
      "max      8.000000    1.000000   11.000000     2.000000     2.000000  \n",
      "              Age        Fare       Parch  PassengerId      Pclass  \\\n",
      "count  418.000000  417.000000  418.000000   418.000000  418.000000   \n",
      "mean    29.703146   35.627188    0.392344  1100.500000    2.265550   \n",
      "std     13.176093   55.907576    0.981429   120.810458    0.841838   \n",
      "min      0.170000    0.000000    0.000000   892.000000    1.000000   \n",
      "25%     22.000000    7.895800    0.000000   996.250000    1.000000   \n",
      "50%     28.204105   14.454200    0.000000  1100.500000    3.000000   \n",
      "75%     36.375000   31.500000    0.000000  1204.750000    3.000000   \n",
      "max     76.000000  512.329200    9.000000  1309.000000    3.000000   \n",
      "\n",
      "            SibSp  Survived  FamilySize  FamilyLabel  TicketGroup  \n",
      "count  418.000000       0.0  418.000000   418.000000   418.000000  \n",
      "mean     0.447368       NaN    1.839713     1.332536     1.346890  \n",
      "std      0.896760       NaN    1.519072     0.501263     0.496271  \n",
      "min      0.000000       NaN    1.000000     0.000000     0.000000  \n",
      "25%      0.000000       NaN    1.000000     1.000000     1.000000  \n",
      "50%      0.000000       NaN    1.000000     1.000000     1.000000  \n",
      "75%      1.000000       NaN    2.000000     2.000000     2.000000  \n",
      "max      8.000000       NaN   11.000000     2.000000     2.000000  \n"
     ]
    }
   ],
   "source": [
    "###cv时对train data再做cv，子cv可以是2折，一半训练缺失值填充，一半填上缺失值并训练以预测顶级cv的test\n",
    "###两次子cv的平均值，为顶cv的一个划分的结果。\n",
    "from sklearn import cross_validation\n",
    "\n",
    "train = all_data[all_data['Survived'].notnull()]\n",
    "test  = all_data[all_data['Survived'].isnull()]\n",
    "# 分割数据，按照 训练数据:cv数据 = 1:1的比例\n",
    "train_split_1, train_split_2 = cross_validation.train_test_split(train, test_size=0.5, random_state=0)\n",
    "\n",
    "\n",
    "def predict_age_use_cross_validationg(df1,df2,dfTest):\n",
    "    age_df1 = df1[['Age', 'Pclass','Sex','Title']]\n",
    "    age_df1 = pd.get_dummies(age_df1)\n",
    "    age_df2 = df2[['Age', 'Pclass','Sex','Title']]\n",
    "    age_df2 = pd.get_dummies(age_df2)\n",
    "    \n",
    "    known_age = age_df1[age_df1.Age.notnull()].as_matrix()\n",
    "    unknow_age_df1 = age_df1[age_df1.Age.isnull()].as_matrix()\n",
    "    unknown_age = age_df2[age_df2.Age.isnull()].as_matrix()\n",
    "    \n",
    "    print (unknown_age.shape)\n",
    "    \n",
    "    y = known_age[:, 0]\n",
    "    X = known_age[:, 1:]\n",
    "    \n",
    "    rfr = RandomForestRegressor(random_state=0, n_estimators=100, n_jobs=-1)\n",
    "    rfr.fit(X, y)\n",
    "    predictedAges = rfr.predict(unknown_age[:, 1::])\n",
    "    df2.loc[ (df2.Age.isnull()), 'Age' ] = predictedAges \n",
    "    predictedAges = rfr.predict(unknow_age_df1[:,1::])\n",
    "    df1.loc[(df1.Age.isnull()),'Age'] = predictedAges\n",
    "    \n",
    "\n",
    "    age_Test = dfTest[['Age', 'Pclass','Sex','Title']]\n",
    "    age_Test = pd.get_dummies(age_Test)\n",
    "    age_Tmp = df2[['Age', 'Pclass','Sex','Title']]\n",
    "    age_Tmp = pd.get_dummies(age_Tmp)\n",
    "    \n",
    "    age_Tmp = pd.concat([age_Test[age_Test.Age.notnull()],age_Tmp])\n",
    "    \n",
    "    known_age1 = age_Tmp.as_matrix()\n",
    "    unknown_age1 = age_Test[age_Test.Age.isnull()].as_matrix()\n",
    "    y = known_age1[:,0]\n",
    "    x = known_age1[:,1:]\n",
    "\n",
    "    rfr.fit(x, y)\n",
    "    predictedAges = rfr.predict(unknown_age1[:, 1:])\n",
    "    dfTest.loc[ (dfTest.Age.isnull()), 'Age' ] = predictedAges \n",
    "    \n",
    "    return dfTest\n",
    "    \n",
    "t1 = train_split_1.copy()\n",
    "t2 = train_split_2.copy()\n",
    "tmp1 = test.copy()\n",
    "t5 = predict_age_use_cross_validationg(t1,t2,tmp1)\n",
    "t1 = pd.concat([t1,t2])\n",
    "\n",
    "t3 = train_split_1.copy()\n",
    "t4 = train_split_2.copy()\n",
    "tmp2 = test.copy()\n",
    "t6 = predict_age_use_cross_validationg(t4,t3,tmp2)\n",
    "t3 = pd.concat([t3,t4])\n",
    "\n",
    "train['Age'] = (t1['Age'] + t3['Age'])/2\n",
    "\n",
    "\n",
    "test['Age'] = (t5['Age'] + t6['Age']) / 2\n",
    "\n",
    "print (train.describe())\n",
    "print (test.describe())\n",
    "\n",
    "all_data = pd.concat([train,test])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Age</th>\n",
       "      <th>Cabin</th>\n",
       "      <th>Embarked</th>\n",
       "      <th>Fare</th>\n",
       "      <th>Name</th>\n",
       "      <th>Parch</th>\n",
       "      <th>PassengerId</th>\n",
       "      <th>Pclass</th>\n",
       "      <th>Sex</th>\n",
       "      <th>SibSp</th>\n",
       "      <th>Survived</th>\n",
       "      <th>Ticket</th>\n",
       "      <th>Deck</th>\n",
       "      <th>Title</th>\n",
       "      <th>FamilySize</th>\n",
       "      <th>FamilyLabel</th>\n",
       "      <th>TicketGroup</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>61</th>\n",
       "      <td>38.0</td>\n",
       "      <td>B28</td>\n",
       "      <td>NaN</td>\n",
       "      <td>80.0</td>\n",
       "      <td>Icard, Miss. Amelie</td>\n",
       "      <td>0</td>\n",
       "      <td>62</td>\n",
       "      <td>1</td>\n",
       "      <td>female</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>113572</td>\n",
       "      <td>B</td>\n",
       "      <td>Miss</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>829</th>\n",
       "      <td>62.0</td>\n",
       "      <td>B28</td>\n",
       "      <td>NaN</td>\n",
       "      <td>80.0</td>\n",
       "      <td>Stone, Mrs. George Nelson (Martha Evelyn)</td>\n",
       "      <td>0</td>\n",
       "      <td>830</td>\n",
       "      <td>1</td>\n",
       "      <td>female</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>113572</td>\n",
       "      <td>B</td>\n",
       "      <td>Mrs</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      Age Cabin Embarked  Fare                                       Name  \\\n",
       "61   38.0   B28      NaN  80.0                        Icard, Miss. Amelie   \n",
       "829  62.0   B28      NaN  80.0  Stone, Mrs. George Nelson (Martha Evelyn)   \n",
       "\n",
       "     Parch  PassengerId  Pclass     Sex  SibSp  Survived  Ticket Deck Title  \\\n",
       "61       0           62       1  female      0       1.0  113572    B  Miss   \n",
       "829      0          830       1  female      0       1.0  113572    B   Mrs   \n",
       "\n",
       "     FamilySize  FamilyLabel  TicketGroup  \n",
       "61            1            1            2  \n",
       "829           1            1            2  "
      ]
     },
     "execution_count": 104,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "all_data[all_data['Embarked'].isnull()]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "metadata": {},
   "outputs": [],
   "source": [
    "all_data['Embarked'] = all_data['Embarked'].fillna('C')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "metadata": {},
   "outputs": [],
   "source": [
    "fare=all_data[(all_data['Embarked'] == \"S\") & (all_data['Pclass'] == 3)].Fare.median()\n",
    "all_data['Fare']=all_data['Fare'].fillna(fare)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "metadata": {},
   "outputs": [],
   "source": [
    "all_data['Surname']=all_data['Name'].apply(lambda x:x.split(',')[0].strip())\n",
    "Surname_Count = dict(all_data['Surname'].value_counts())\n",
    "all_data['FamilyGroup'] = all_data['Surname'].apply(lambda x:Surname_Count[x])\n",
    "Female_Child_Group=all_data.loc[(all_data['FamilyGroup']>=2) & ((all_data['Age']<=12) | (all_data['Sex']=='female'))]\n",
    "Male_Adult_Group=all_data.loc[(all_data['FamilyGroup']>=2) & (all_data['Age']>12) & (all_data['Sex']=='male')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>GroupCount</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1.000000</th>\n",
       "      <td>115</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.000000</th>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.750000</th>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.333333</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.142857</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          GroupCount\n",
       "1.000000         115\n",
       "0.000000          31\n",
       "0.750000           2\n",
       "0.333333           1\n",
       "0.142857           1"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Female_Child=pd.DataFrame(Female_Child_Group.groupby('Surname')['Survived'].mean().value_counts())\n",
    "Female_Child.columns=['GroupCount']\n",
    "Female_Child"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>GroupCount</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0.000000</th>\n",
       "      <td>122</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.000000</th>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.500000</th>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.333333</th>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.250000</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          GroupCount\n",
       "0.000000         122\n",
       "1.000000          20\n",
       "0.500000           6\n",
       "0.333333           2\n",
       "0.250000           1"
      ]
     },
     "execution_count": 109,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Male_Adult=pd.DataFrame(Male_Adult_Group.groupby('Surname')['Survived'].mean().value_counts())\n",
    "Male_Adult.columns=['GroupCount']\n",
    "Male_Adult"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'Danbom', 'Ilmakangas', 'Robins', 'Caram', 'Strom', 'Panula', 'Johnston', 'Canavan', 'Lefebre', 'Van Impe', 'Ford', 'Goodwin', 'Boulos', 'Bourke', 'Oreskovic', 'Olsson', 'Zabour', 'Cacic', 'Jussila', 'Lobb', 'Attalah', 'Sage', 'Rice', 'Turpin', 'Skoog', 'Vander Planke', 'Palsson', 'Lahtinen', 'Rosblom', 'Barbara', 'Arnold-Franchi'}\n",
      "{'Harder', 'Jonsson', 'Cardeza', 'Kimball', 'Nakid', 'Taylor', 'Bishop', 'Frauenthal', 'Frolicher-Stehli', 'Goldenberg', 'Beckwith', 'Dick', 'Jussila', 'Chambers', 'Duff Gordon', 'Greenfield', 'McCoy', 'Beane', 'Daly', 'Bradley'}\n"
     ]
    }
   ],
   "source": [
    "Female_Child_Group=Female_Child_Group.groupby('Surname')['Survived'].mean()\n",
    "Dead_List=set(Female_Child_Group[Female_Child_Group.apply(lambda x:x==0)].index)\n",
    "print(Dead_List)\n",
    "Male_Adult_List=Male_Adult_Group.groupby('Surname')['Survived'].mean()\n",
    "Survived_List=set(Male_Adult_List[Male_Adult_List.apply(lambda x:x==1)].index)\n",
    "print(Survived_List)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Age</th>\n",
       "      <th>Cabin</th>\n",
       "      <th>Embarked</th>\n",
       "      <th>Fare</th>\n",
       "      <th>Name</th>\n",
       "      <th>Parch</th>\n",
       "      <th>PassengerId</th>\n",
       "      <th>Pclass</th>\n",
       "      <th>Sex</th>\n",
       "      <th>SibSp</th>\n",
       "      <th>Survived</th>\n",
       "      <th>Ticket</th>\n",
       "      <th>Deck</th>\n",
       "      <th>Title</th>\n",
       "      <th>FamilySize</th>\n",
       "      <th>FamilyLabel</th>\n",
       "      <th>TicketGroup</th>\n",
       "      <th>Surname</th>\n",
       "      <th>FamilyGroup</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>22.0</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>S</td>\n",
       "      <td>7.2500</td>\n",
       "      <td>Braund, Mr. Owen Harris</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>male</td>\n",
       "      <td>1</td>\n",
       "      <td>0.0</td>\n",
       "      <td>A/5 21171</td>\n",
       "      <td>U</td>\n",
       "      <td>Mr</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>Braund</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>38.0</td>\n",
       "      <td>C85</td>\n",
       "      <td>C</td>\n",
       "      <td>71.2833</td>\n",
       "      <td>Cumings, Mrs. John Bradley (Florence Briggs Th...</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>female</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>PC 17599</td>\n",
       "      <td>C</td>\n",
       "      <td>Mrs</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>Cumings</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>26.0</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>S</td>\n",
       "      <td>7.9250</td>\n",
       "      <td>Heikkinen, Miss. Laina</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>female</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>STON/O2. 3101282</td>\n",
       "      <td>U</td>\n",
       "      <td>Miss</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Heikkinen</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>35.0</td>\n",
       "      <td>C123</td>\n",
       "      <td>S</td>\n",
       "      <td>53.1000</td>\n",
       "      <td>Futrelle, Mrs. Jacques Heath (Lily May Peel)</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>female</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>113803</td>\n",
       "      <td>C</td>\n",
       "      <td>Mrs</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>Futrelle</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>35.0</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>S</td>\n",
       "      <td>8.0500</td>\n",
       "      <td>Allen, Mr. William Henry</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>male</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>373450</td>\n",
       "      <td>U</td>\n",
       "      <td>Mr</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Allen</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Age    Cabin Embarked     Fare  \\\n",
       "0  22.0  Unknown        S   7.2500   \n",
       "1  38.0      C85        C  71.2833   \n",
       "2  26.0  Unknown        S   7.9250   \n",
       "3  35.0     C123        S  53.1000   \n",
       "4  35.0  Unknown        S   8.0500   \n",
       "\n",
       "                                                Name  Parch  PassengerId  \\\n",
       "0                            Braund, Mr. Owen Harris      0            1   \n",
       "1  Cumings, Mrs. John Bradley (Florence Briggs Th...      0            2   \n",
       "2                             Heikkinen, Miss. Laina      0            3   \n",
       "3       Futrelle, Mrs. Jacques Heath (Lily May Peel)      0            4   \n",
       "4                           Allen, Mr. William Henry      0            5   \n",
       "\n",
       "   Pclass     Sex  SibSp  Survived            Ticket Deck Title  FamilySize  \\\n",
       "0       3    male      1       0.0         A/5 21171    U    Mr           2   \n",
       "1       1  female      1       1.0          PC 17599    C   Mrs           2   \n",
       "2       3  female      0       1.0  STON/O2. 3101282    U  Miss           1   \n",
       "3       1  female      1       1.0            113803    C   Mrs           2   \n",
       "4       3    male      0       0.0            373450    U    Mr           1   \n",
       "\n",
       "   FamilyLabel  TicketGroup    Surname  FamilyGroup  \n",
       "0            2            1     Braund            2  \n",
       "1            2            2    Cumings            2  \n",
       "2            1            1  Heikkinen            1  \n",
       "3            2            2   Futrelle            2  \n",
       "4            1            1      Allen            2  "
      ]
     },
     "execution_count": 111,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train=all_data.loc[all_data['Survived'].notnull()]\n",
    "test=all_data.loc[all_data['Survived'].isnull()]\n",
    "test.loc[(test['Surname'].apply(lambda x:x in Dead_List)),'Sex'] = 'male'\n",
    "test.loc[(test['Surname'].apply(lambda x:x in Dead_List)),'Age'] = 60\n",
    "test.loc[(test['Surname'].apply(lambda x:x in Dead_List)),'Title'] = 'Mr'\n",
    "test.loc[(test['Surname'].apply(lambda x:x in Survived_List)),'Sex'] = 'female'\n",
    "test.loc[(test['Surname'].apply(lambda x:x in Survived_List)),'Age'] = 5\n",
    "test.loc[(test['Surname'].apply(lambda x:x in Survived_List)),'Title'] = 'Miss'\n",
    "train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {},
   "outputs": [],
   "source": [
    "all_data=pd.concat([train, test])\n",
    "all_data=all_data[['Survived','Pclass','Sex','Age','Fare','Embarked','Title','FamilyLabel','Deck','TicketGroup']]\n",
    "all_data=pd.get_dummies(all_data)\n",
    "train=all_data[all_data['Survived'].notnull()]\n",
    "test=all_data[all_data['Survived'].isnull()].drop('Survived',axis=1)\n",
    "X = train.as_matrix()[:,1:]\n",
    "y = train.as_matrix()[:,0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "Int64Index: 891 entries, 0 to 890\n",
      "Data columns (total 26 columns):\n",
      "Survived         891 non-null float64\n",
      "Pclass           891 non-null int64\n",
      "Age              891 non-null float64\n",
      "Fare             891 non-null float64\n",
      "FamilyLabel      891 non-null int64\n",
      "TicketGroup      891 non-null int64\n",
      "Sex_female       891 non-null uint8\n",
      "Sex_male         891 non-null uint8\n",
      "Embarked_C       891 non-null uint8\n",
      "Embarked_Q       891 non-null uint8\n",
      "Embarked_S       891 non-null uint8\n",
      "Title_Master     891 non-null uint8\n",
      "Title_Miss       891 non-null uint8\n",
      "Title_Mr         891 non-null uint8\n",
      "Title_Mrs        891 non-null uint8\n",
      "Title_Officer    891 non-null uint8\n",
      "Title_Royalty    891 non-null uint8\n",
      "Deck_A           891 non-null uint8\n",
      "Deck_B           891 non-null uint8\n",
      "Deck_C           891 non-null uint8\n",
      "Deck_D           891 non-null uint8\n",
      "Deck_E           891 non-null uint8\n",
      "Deck_F           891 non-null uint8\n",
      "Deck_G           891 non-null uint8\n",
      "Deck_T           891 non-null uint8\n",
      "Deck_U           891 non-null uint8\n",
      "dtypes: float64(3), int64(3), uint8(20)\n",
      "memory usage: 66.1 KB\n"
     ]
    }
   ],
   "source": [
    "train.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'classify__max_depth': 6, 'classify__n_estimators': 42} 0.8804824488491222\n"
     ]
    }
   ],
   "source": [
    "pipe=Pipeline([('select',SelectKBest(k=20)), \n",
    "               ('classify', RandomForestClassifier(random_state = 10, max_features = 'sqrt'))])\n",
    "\n",
    "param_test = {'classify__n_estimators':list(range(20,50,2)), \n",
    "              'classify__max_depth':list(range(3,60,3))}\n",
    "gsearch = GridSearchCV(estimator = pipe, param_grid = param_test, scoring='roc_auc', cv=10)\n",
    "gsearch.fit(X,y)\n",
    "print(gsearch.best_params_, gsearch.best_score_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Pipeline(memory=None,\n",
       "     steps=[('selectkbest', SelectKBest(k=20, score_func=<function f_classif at 0x000001D5383E5048>)), ('randomforestclassifier', RandomForestClassifier(bootstrap=True, class_weight=None, criterion='gini',\n",
       "            max_depth=6, max_features='sqrt', max_leaf_nodes=None,\n",
       "            min_impurity_decreas...estimators=24, n_jobs=1,\n",
       "            oob_score=False, random_state=10, verbose=0, warm_start=True))])"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "select = SelectKBest(k = 20)\n",
    "clf = RandomForestClassifier(random_state = 10, warm_start = True, \n",
    "                                  n_estimators = 24,\n",
    "                                  max_depth = 6, \n",
    "                                  max_features = 'sqrt')\n",
    "pipeline = make_pipeline(select, clf)\n",
    "pipeline.fit(X, y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 121,
   "metadata": {},
   "outputs": [],
   "source": [
    "predictions = pipeline.predict(test)\n",
    "submission = pd.DataFrame({\"PassengerId\": PassengerId, \"Survived\": predictions.astype(np.int32)})\n",
    "submission.to_csv(\"submission.csv\", index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
